package com.jacky.dubbo3;

import com.jacky.dubbo3.proto.DubboGreeterTriple.GreeterImplBase;
import com.jacky.dubbo3.proto.GreeterReply;
import com.jacky.dubbo3.proto.GreeterRequest;
import org.apache.dubbo.config.annotation.DubboService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@DubboService
public class GreeterImpl extends GreeterImplBase {

    private static final Logger LOGGER = LoggerFactory.getLogger(GreeterImpl.class);

    @Override
    public GreeterReply greet(GreeterRequest request) {
        LOGGER.info("provider received greet req:{}", request);
        return GreeterReply.newBuilder()
                .setMessage("hello " + request.getName())
                .build();
    }
}
